*------------- Upper-Body Strength and Political Egalitarianism: Twelve Conceptual Replications ------------------------------------*
*----------------------------------------------------- META-ANALYSIS  --------------------------------------------------------------*

*-------------------------------------------------- Initial Recodings --------------------------------------------------------------*


destring EffectSize StandardError N, force replace

gen Male=.
replace Male=1 if Sex=="Male"
replace Male=0 if Sex=="Female"

gen Lab=.
replace Lab=1 if Method=="Lab"
replace Lab=0 if Method=="Online"

gen SDO=.
replace SDO=1 if DV=="SDO"
replace SDO=0 if DV=="EconCons"

*-------------------------------------------------- Averaging Effect Sizes ---------------------------------------------------------*

egen avEffectSize=mean(EffectSize), by(Study Sex)
egen avStandardError=mean(StandardError), by(Study Sex)

*------------------------------------------------------- Analyses --------------------------------------------------------------*

* Average effect sizes for males and females

bys Male: metareg avEffectSize if DV=="SDO", wsse(avStandardError)

* Effect of sex on effect size estimates

metareg avEffectSize Male if DV=="SDO", wsse(avStandardError)

*  Effect size estimates for different data collection methods

bys Lab Male: metareg avEffectSize if DV=="SDO", wsse(avStandardError)
bys Lab: metareg avEffectSize Male if DV=="SDO", wsse(avStandardError)
